package org.weed.iremote.service;

import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

public class RemoteService extends Service {
	private NotificationManager notificationManager;
	private IBinder binder;
	
	@Override
	public void onCreate() {
		notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
		binder = new ServiceBinder();
		Log.d(this.getClass().getName(), "onCreate");
	}
	
	@Override
	public int onStartCommand(Intent intent, int flags, int id) {
		Log.d(this.getClass().getName(), "onStartComman[flags=" + flags + ", id=" + id + "]");
		return START_STICKY;
	}
	
	@Override
	public void onDestroy() {
		//notificationManager.cancel(NOTIFICATION);
		
	}
	
	@Override
	public IBinder onBind(Intent intent) {
		return binder;
	}
	
	public class ServiceBinder extends Binder {
		public RemoteService getService() {
			return RemoteService.this;
		}
	}
}
